Skip to main content

IDE Code Quality Setup

Configure your IDE to run linting/formatting on save. Hooks are a safety net - IDE integration is the primary workflow.

PhpStorm

Duster File Watcher

Set up a file watcher to run Duster on PHP files when saving:

  1. Create a Duster file watcher lint01

  2. Enable it in "Actions on save" lint02

  3. Make sure PHP is disabled from "Reformat code" lint03

EditorConfig

We use EditorConfig with the PhpStorm plugin for non-PHP code formatting.

  1. Enable the EditorConfig plugin in PhpStorm settings (may need to install if not present) ps01 ps02

  2. Each project has a .editorconfig symlink pointing to Zoo's centralized config:

    .editorconfig -> ../zoo/.editorconfig

    ps03

  3. All editorconfig changes are made in Zoo - they propagate to all projects via symlinks

  4. Enable "Reformat code" (except PHP) and "Optimize imports" on save: ps04

Larastan (PHPStan)

PHPStan is not configured as an "on save" action because it's resource-intensive.

Run manually:

./vendor/bin/phpstan analyse

Fix issues:

./vendor/bin/phpstan analyse --fix

Generate baseline for existing code:

./vendor/bin/phpstan analyse --generate-baseline

Baseline is stored at phpstan-baseline.neon.

VS Code

Coming soon

Claude Code

Coming soon

X

Graph View